package com.acme.bankapp.domain.bank;

/**
 * Thrown when there isn't enough funds to withdraw
 * @author Artem Nikitin
 *
 */
public class NotEnoughFundsException extends Exception {

	private static final long serialVersionUID = 1L;
	
	/**
	 * Amount of funds that was attempted to withdraw
	 */
	private double amount;
	
	public NotEnoughFundsException(double amount) {
		this.amount = amount;
	}

	public double getAmount() {
		return amount;
	}
	
	@Override
	public String getMessage() {
		return "Not enough funds to withdraw " + this.amount;
	}

}
